import request from '@/utils/request'

/**
 * 创建酒店
 * @returns 
 */
export function addHotel(params) {
  let url = '/hotel/addHotel';
  return request({
    url: url,
    method: 'post',
    data: params
  })
}

export function delHotel(hotelId) {
  return request({
    url: '/hotel/del/' + hotelId,
    method: 'get'
  })
}

export function getHotel(hotelId) {
  return request({
    url: '/hotel/get/' + hotelId,
    method: 'get'
  })
}

export function listHotel(params) {
  return request({
    url: '/hotel/list',
    method: 'post',
    data: params
  })
}

export function saveHotel(params) {
  let url = '/hotel/saveHotel';
  return request({
    url: url,
    method: 'post',
    data: params
  })
}

export function allcity() {
  let url = '/hotel/allcity';
  return request({
    url: url,
    method: 'post'
  })
}

export function search(params) {
  let url = '/hotel/search';
  return request({
    url: url,
    method: 'post',
    data: params
  })
}

export function sugsearch(params) {
  let url = '/hotel/sugsearch';
  return request({
    url: url,
    method: 'post',
    data: params
  })
}